]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaces-display: Improve pager autohide
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 16 Jun 2011 12:10:15 +0000 (14:10 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 17 Jun 2011 22:10:43 +0000 (00:10 +0200)
The purpose of autohiding the workspace pager on the right was to
avoid exposure of workspaces to users who are not using them.
However, for users who do use workspaces, the behavior limits the
purpose of the overview. To fix, always show the pager if more than
one workspace is actively used.

https://bugzilla.gnome.org/show_bug.cgi?id=652714

js/ui/workspacesView.js

index 9c5b595519f6e12c9745c7aade7a2272fbfd1781..9218a7b7d4339bece45be49643d2e9f772e9c6ed 100644 (file)
@@ -681,7 +681,12 @@ WorkspacesDisplay.prototype = {
     },
 
     _updateAlwaysZoom: function()  {
-        this._alwaysZoomOut = false;
+        // Always show the pager if workspaces are actually used,
+        // e.g. there are windows on more than one
+        this._alwaysZoomOut = global.screen.n_workspaces > 2;
+
+        if (this._alwaysZoomOut)
+            return;
 
         let monitors = global.get_monitors();
         let primary = global.get_primary_monitor();
@@ -825,6 +830,8 @@ WorkspacesDisplay.prototype = {
 
         this.workspacesView.updateWorkspaces(oldNumWorkspaces,
                                              newNumWorkspaces);
+        this._updateAlwaysZoom();
+        this._updateZoom();
     },
 
     _updateZoom : function() {